﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="./Public/Admin/Css/public.css" rel="stylesheet" type="text/css" />
<title>文章分类管理</title>
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="border">
	<tr class="topbg"><td>文章分类管理</td></tr>
	<tr class="tdbg">
	  <td height="30">&nbsp;&nbsp;<a href="?c=Category&a=index">管理首页</a>&nbsp;|&nbsp;<a href="?c=Category&a=add">添加文章分类</a></td>
	</tr>
</table>
<br />
<form id="form1" name="form1" method="post" action="?c=Category&a=insert" onsubmit="return checkForm()">
  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="border">
    <tr class="title">
      <td colspan="2" align="center">添加文章分类</td>
    </tr>
    <tr class="tdbg">
      <td width="11%" height="30" align="right">名&nbsp;&nbsp;称：</td>
      <td width="89%"><input name="classname" type="text" id="classname" size="90" maxlength="50" /></td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">排&nbsp;&nbsp;序：</td>
      <td><input name="orderby" type="text" id="orderby" value="50" size="5" maxlength="5" /> 
      数值数小，排序越靠前 </td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">父分类：</td>
      <td>
		<select name="pid">
			<option value="0">无</option>
			<{foreach $arr as $arr2 }>
				<option value="<{$arr2['id']}>"><{str_repeat('--',$arr2['level']*2)}> <{$arr2['classname']}></option>
			<{/foreach}>
		</select>
	  </td>
    </tr>
    <tr class="tdbg">
      <td height="30" align="right">&nbsp;</td>
      <td><input type="submit" value="添加" />
      <input type="button" onclick="history.go(-1)" value="返回" /></td>
    </tr>
  </table>
</form>
</body>
</html>
<script language="javascript">
function checkForm()
{
	if(document.form1.classname.value=="")
	{
		alert("名称不能为空");
		document.form1.classname.focus();
		return false;
	}
}
</script>